Encrypt File
AutomatR.DefaultActivities.Cryptography.EncryptFile
The "Encrypt File" activity in AutomatR is part of the Cryptography activities package, enabling automation processes to encrypt files using various encryption algorithms. This activity provides a secure way to protect sensitive information within files.
Name | Description |
---|---|
Input | |
Algorithm | Specifies the cryptographic algorithm to be used for encryption. Options include AES (Advanced Encryption Standard), DES (Data Encryption Standard), Triple DES, AESGCM (AES Galois/Counter Mode), RC2, and Rijndael. Supports a CryptographyAlgorithm enumeration variable. |
File Path | Specifies the path of the file that you want to encrypt. Supports a string variable. |
Key | Specifies the encryption key to be used. The key should be kept confidential and used for decryption later. Supports a SecureString variable. |
Misc | |
Display Name | This property allows you to customize the display name of the activity within the workflow. |
Optional | |
Delay | Specifies a delay (in seconds) before executing the activity, providing flexibility in the timing of the workflow. Supports an Int32 variable. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1. |
Output | |
Output Path | Specifies the path where the encrypted file will be saved. It supports a string variable, allowing you to define the destination path dynamically. |
How to use:
- Drag and drop the "Encrypt File" activity onto the workflow.
- Configure the properties by specifying the encryption algorithm, key, file path, and output path.
- Optionally, configure the delay.
- Execute the workflow to encrypt the specified file using the chosen algorithm and key.
Example: Consider an example where the "Encrypt File" activity is used to encrypt a file named "document.txt" using the AES algorithm:
Encrypt File:
Algorithm: AES
Key: "MySecretKey123"
File Path: "C:\Files\document.txt"
Output Path: "C:\EncryptedFiles\document_encrypted.txt"
Result: isEncryptionSuccessful
In this example, the activity encrypts the "document.txt" file using the specified AES algorithm and key. The result of the operation (success or failure) is stored in the Boolean variable "isEncryptionSuccessful" for further handling in the workflow.